# 将列表映射到函数的可变参数
def printParams(s1, s2):
  print(s1, s2)

printParams('hello', 'world')
# hello world

list = ['hello', 'world']
# 记得加1个*
printParams(*list)
# hello world

# -------------------------

# 将字典映射到函数的可变参数
def printParams2(**params):
  for item in params.items():
    print('key = {}, value = {}'.format(item[0], item[1]), end=' ;;; ')

dict = {'name':'Alex', 'age':18}
# 记得加2个*
printParams2(**dict)
# key = name, value = Alex ;;; key = age, value = 18 ;;;